using Net35.Xrm.Sdk;
using System;
using System.Runtime.Serialization;
namespace Net35.Crm.Sdk.Messages
{
	[DataContract(Namespace = "http://schemas.microsoft.com/crm/2011/Contracts")]
	public sealed class DeliverIncomingEmailRequest : OrganizationRequest
	{
		public string MessageId
		{
			get
			{
				if (base.Parameters.Contains("MessageId"))
				{
					return (string)base.Parameters["MessageId"];
				}
				return null;
			}
			set
			{
				base.Parameters["MessageId"] = value;
			}
		}
		public string Subject
		{
			get
			{
				if (base.Parameters.Contains("Subject"))
				{
					return (string)base.Parameters["Subject"];
				}
				return null;
			}
			set
			{
				base.Parameters["Subject"] = value;
			}
		}
		public string From
		{
			get
			{
				if (base.Parameters.Contains("From"))
				{
					return (string)base.Parameters["From"];
				}
				return null;
			}
			set
			{
				base.Parameters["From"] = value;
			}
		}
		public string To
		{
			get
			{
				if (base.Parameters.Contains("To"))
				{
					return (string)base.Parameters["To"];
				}
				return null;
			}
			set
			{
				base.Parameters["To"] = value;
			}
		}
		public string Cc
		{
			get
			{
				if (base.Parameters.Contains("Cc"))
				{
					return (string)base.Parameters["Cc"];
				}
				return null;
			}
			set
			{
				base.Parameters["Cc"] = value;
			}
		}
		public string Bcc
		{
			get
			{
				if (base.Parameters.Contains("Bcc"))
				{
					return (string)base.Parameters["Bcc"];
				}
				return null;
			}
			set
			{
				base.Parameters["Bcc"] = value;
			}
		}
		public DateTime ReceivedOn
		{
			get
			{
				if (base.Parameters.Contains("ReceivedOn"))
				{
					return (DateTime)base.Parameters["ReceivedOn"];
				}
				return default(DateTime);
			}
			set
			{
				base.Parameters["ReceivedOn"] = value;
			}
		}
		public string SubmittedBy
		{
			get
			{
				if (base.Parameters.Contains("SubmittedBy"))
				{
					return (string)base.Parameters["SubmittedBy"];
				}
				return null;
			}
			set
			{
				base.Parameters["SubmittedBy"] = value;
			}
		}
		public string Importance
		{
			get
			{
				if (base.Parameters.Contains("Importance"))
				{
					return (string)base.Parameters["Importance"];
				}
				return null;
			}
			set
			{
				base.Parameters["Importance"] = value;
			}
		}
		public string Body
		{
			get
			{
				if (base.Parameters.Contains("Body"))
				{
					return (string)base.Parameters["Body"];
				}
				return null;
			}
			set
			{
				base.Parameters["Body"] = value;
			}
		}
		public EntityCollection Attachments
		{
			get
			{
				if (base.Parameters.Contains("Attachments"))
				{
					return (EntityCollection)base.Parameters["Attachments"];
				}
				return null;
			}
			set
			{
				base.Parameters["Attachments"] = value;
			}
		}
		public Entity ExtraProperties
		{
			get
			{
				if (base.Parameters.Contains("ExtraProperties"))
				{
					return (Entity)base.Parameters["ExtraProperties"];
				}
				return null;
			}
			set
			{
				base.Parameters["ExtraProperties"] = value;
			}
		}
		public bool ValidateBeforeCreate
		{
			get
			{
				return base.Parameters.Contains("ValidateBeforeCreate") && (bool)base.Parameters["ValidateBeforeCreate"];
			}
			set
			{
				base.Parameters["ValidateBeforeCreate"] = value;
			}
		}
		public DeliverIncomingEmailRequest()
		{
			base.RequestName = "DeliverIncomingEmail";
			this.MessageId = null;
			this.From = null;
			this.To = null;
			this.Cc = null;
			this.Bcc = null;
			this.ReceivedOn = default(DateTime);
			this.SubmittedBy = null;
			this.Importance = null;
			this.Body = null;
			this.Attachments = null;
		}
	}
}
